package com.springboot.project.Scheduler;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author liupenghui
 * @date 2018/7/10
 * @desc：
 */
@Component
public class SchedulerTask {
    private int count=0;

    @Scheduled(cron="*/6 * * * * ?")
    private void process(){
        System.out.println("定时任务1 执行次数：  "+(count++));
    }
}
